package com.xunlai.infra.permission.storage.entity;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author liang
 * @date 12/9/22 10:17 AM
 */
@Table("system_role_permission")
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class RolePermission extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = -7706363367251837659L;

    @Id
    private Long id;
    /**
     * 角色ID
     */
    private Long roleId;

    /**
     * 角色code
     */
    private String roleCode;

    /**
     * 权限资源id
     */
    private Long resourceId;

    /**
     * 权限资源类型
     */
    private Short resourceType;

    /**
     * 权限资源来源 默认BUILD-IN 内置
     */
    private String resourceSource;
}
